<template>
  <div>
    <input
      type="password"
      placeholder="原密码"
      v-model="password"
      style="border-bottom:2px solid #eee;margin:61rpx 40rpx;"
    />
    <button class="qs_btn" :disabled="disabled" @click="Nextstep">下一步</button>
  </div>
</template>
<script>
export default {
  data() {
    return {
      password: ""
    };
  },
  computed: {
    disabled() {
      const password =wx.getStorageSync('loginInfo')
      if (this.password!=password.password ) {

        return true;
      } else {

        return false;
      }
    }
  },
  onLoad() {
    this.getData();
  },
  methods: {
    getData(){
      this.password=''
    },
    Nextstep() {
      // if(this.password=''){
      //    wx.showToast({
      //   title: '密码不能为空！',
      //   icon: 'none',
      //   duration: 500
      // })
      // }else if(this.password != 456){
      //   wx.showToast({
      //   title: '原密码不对！',
      //   icon: 'none',
      //   duration: 500
      // })
      // }else {
        wx.navigateTo({
         url: "../newpassword/main"
       });
      // }
    }
  }
};
</script>
<style>
.qs_btn {
  margin: 0 40rpx;
  background: #0097fb;
  color: #fff;
}
</style>
